package com.baizhi.service.impl;

import com.baizhi.dao.UserDao;
import com.baizhi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

//@Component
@Service
public class UserServiceImpl implements UserService {
    //业务层是调用Dao对象的方法的，所以需要有一个Dao对象作为其属性
    @Autowired
    private UserDao userDao;

    //增
    public void addUser(){
        userDao.insert();
    }

    //删
    public void deleteUser(){
        userDao.delete();
    }
}
